var SubCreateRoomWindow = CreateRoomWindow.extend({
    _ccsFileName: res.CreateRoomWindow_json,

    _handleSpecialDepend:function(){
        CreateRoomWindow.prototype._handleSpecialDepend.call(this);
        //this._handlehideAA();
        this._handleshowHideCP();
    },
    /**
     * 处理隐藏AA支付
     */
    _handlehideAA: function () {
        var AANode = this._cbList['AA_1'];
        if (AANode) {
            AANode.setVisible(false);
        }
    },
    /**
     * 处理3人玩无抽牌
     */
    _handleshowHideCP:function () {
        // 宁乡扯胡子
        var mapid = this._cbList['mapid_0'];
        if (!mapid) {
            return;
        }
        var mapidUserData = mapid.getUserData();
        if (!mapidUserData) {
            return;
        }
        if (mapidUserData.val != app.map_id.NXPHZ) {
            return;
        }
        var mapidCb = mapid.getChildByName('checkBox');
        if (!mapidCb) {
            return;
        }
        if (!mapidCb.isSelected()) {
            return;
        }
        // 抽牌文字
        var word_cp = this._nodeList['word_cp'];
        if (!word_cp) {
            return;
        }
        var sanrenwan = this._cbList['maxPlayerCnt_0'];
        var sanrenwanCb = sanrenwan.getChildByName('checkBox');
        if (!sanrenwanCb) {
            return;
        }

        var choupai0 = this._cbList['sipaicnt_0'];
        var choupai0Cb = choupai0.getChildByName('checkBox');

        var choupai1 = this._cbList['sipaicnt_1'];
        var choupai1Cb = choupai1.getChildByName('checkBox');

        var choupai2 = this._cbList['sipaicnt_2'];
        var choupai2Cb = choupai2.getChildByName('checkBox');

        var qiHuXi0 = this._cbList['qiHuXi_0'];
        var qiHuXi0Cb = qiHuXi0.getChildByName('checkBox');

        var qiHuXi1 = this._cbList['qiHuXi_1'];
        var qiHuXi1Cb = qiHuXi1.getChildByName('checkBox');


        if (!choupai0Cb || !choupai1Cb || !choupai2Cb || !qiHuXi1Cb || !qiHuXi0Cb) {
            return;
        }
        if (!choupai0 || !choupai1 || !choupai2 || !qiHuXi0 || !qiHuXi1) {
            return;
        }

        // 如果选中的是三人玩
        if (sanrenwanCb.isSelected() && !this._clubId) {
            word_cp.setVisible(false);
            choupai0.setVisible(false);
            choupai1.setVisible(false);
            choupai2.setVisible(false);
            qiHuXi0.setVisible(false);
            qiHuXi1.setVisible(false);
        }else{
            word_cp.setVisible(true);
            choupai0.setVisible(true);
            choupai1.setVisible(true);
            choupai2.setVisible(true);
            qiHuXi0.setVisible(true);
            qiHuXi1.setVisible(true);
        }
    }
    
    , /**
     * 处理转转麻将的抓码  2人玩没抓麻
     */
    _handleZhuanzhuanZhuaMa: function () {
        // 长沙麻将
        var mapid = this._cbList['mapid_0'];
        if (!mapid) {
            return;
        }
        var mapidUserData = mapid.getUserData();
        if (!mapidUserData) {
            return;
        }
        if (mapidUserData.val != app.map_id.ZHUANZHUAN) {
            return;
        }
        var mapidCb = mapid.getChildByName('checkBox');
        if (!mapidCb) {
            return;
        }
        if (!mapidCb.isSelected()) {
            return;
        }
        // 抓码文字
        var zhuamaWz = this._nodeList['word_zm'];
        if (!zhuamaWz) {
            return;
        }
        // 抓码2，4，6 不翻倍时候
        var hongzhong = this._cbList['hongzhong_0'];
        if (!hongzhong) {
            return;
        }
        //两人玩
        var liangrenwan = this._cbList['liangrenwan_0'];
        var liangrenwanCb = liangrenwan.getChildByName('checkBox');
        if (!liangrenwanCb) {
            return;
        }
        // 如果选中的是不抓码
        if (liangrenwanCb.isSelected() && !this._clubId) {
            hongzhong.setVisible(false);
        }else{
            hongzhong.setVisible(true);
        }
    },
});